<template>
  <div class="box">
    <img src="../../assets/images/error_images/404.png" alt="" />
    <button @click="goHome">点击跳转首页</button>
  </div>
</template>

<script setup lang="ts">
// 引入路由器
import { useRouter } from 'vue-router'
// 获取路由器实例
const router = useRouter()
const goHome = () => {
  router.push('/home')
}
</script>

<style lang="scss" scoped>
.box {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;

  img {
    width: 1000px;
    height: 500px;
  }

  button {
    width: 150px;
    height: 50px;
    border-color: aquamarine;
    margin-top: 300px;
  }
}
</style>
